clear all
set maxvar 5000

**ssc install coefplot
cd "/Users/tg2778/Dropbox/0_Reviews_RnRs/072022_JOP_Roads/v3_JOP/Replication - Roads"
log using "4_Log/4_Balance.log"

use "1_Data/AC_pre-delim_dataset.dta", clear

egen acstateid = concat(VD01_AC_id stateid),p("_")

label var percenteligiblevillage500 "Eligibility Instrument"

quietly areg growth_x percenteligiblevillage500, absorb(statedistrict2) cluster(acstateid)
estimates store pl1

quietly areg growth_gov_x percenteligiblevillage500, absorb(statedistrict2) cluster(acstateid)
estimates store pl2

quietly areg growth_nongov_x percenteligiblevillage500, absorb(statedistrict2) cluster(acstateid)
estimates store pl3

quietly areg growth_y percenteligiblevillage500, absorb(statedistrict2) cluster(acstateid)
estimates store pl4

quietly areg growth_gov_y percenteligiblevillage500, absorb(statedistrict2) cluster(acstateid)
estimates store pl5

quietly areg growth_nongov_y percenteligiblevillage500, absorb(statedistrict2) cluster(acstateid)
estimates store pl6

quietly areg urbanization percenteligiblevillage500, absorb(statedistrict2) cluster(acstateid)
estimates store pl7, title(Urbanization)

*cd "2_Tables"

set scheme s1mono 
coefplot (pl1, label("Employment growth 1990-1998 (pre)")) ///
(pl2, label("Employment growth public 1990-1998 (pre)")) ///
(pl3, label("Employment growth private 1990-1998 (pre)")) ///
(pl4, label("Employment growth 1998-2005 (post)")) ///
(pl5, label("Employment growth public 1998-2005 (post)")) ///
(pl6, label("Employment growth private 1998-2005 (post)")) ///
(pl7, label("Urban population share (pre)")) ///
, keep(percenteligiblevillage500) xline(0) yline(0) legend(cols(1) position(6)) xtitle()
graph export "3_Figs/FigC1.pdf", as(pdf) replace

log close
